$(function(){
    // $(".goback").on('click',function () {
    //     window.location = '/order/index';
    // });

    lay('#version').html('-v'+ laydate.v);
    laydate.render({
        elem: '#start_time'
    });
    laydate.render({
        elem: '#end_time'
    });

    $('.serach').on('click',function(){
        $('#form1').submit();

    });

    $('.payMoney').on('click',function () {
        var id = $(this).attr('id');
        $.ajax({
            'type':'POST',
            'url':'/withdraw/pay-money',
            'data':{
                id:id
            },
            'dataType':'json',
            'beforeSend':function(){
                layer.load(1, {
                    shade: [0.1,'#fff'] //0.1透明度的白色背景
                });
            },
            'success':function(data)
            {
                layer.closeAll();
                if(data.code != 200)
                {
                    layer.alert(data.msg);
                    return false;
                }
                location.href = '/withdraw/index';
            }

        });

    })
});